package com.perfma.xtest.file;

import java.io.File;

/**
 * @author: junhui.si
 * @date: 2020-09-04 17:40
 **/
public class FIleTest {
    public static void main(String[] args) {
        File file = new File("/Users/sijunhui/Downloads/excel/test.xlsx");
        System.out.println("getTotalSpace:" + file.getTotalSpace());
        System.out.println("getFreeSpace:" + file.getFreeSpace() / (1024 * 1024));
        System.out.println("getUsableSpace:" + file.getUsableSpace() / (1024 * 1024));

        file = new File("/Library/ColorSync/Profiles/Blue Tone.icc");
        System.out.println("getTotalSpace:" + file.getTotalSpace());
        System.out.println("getFreeSpace:" + file.getFreeSpace() / (1024 * 1024));
        System.out.println("getUsableSpace:" + file.getUsableSpace() / (1024 * 1024));
    }
}
